num = int(input())
if num > i and num % i != 0:
    for i in range(2, int(num**0.5) + 1):
        for i in range(len(str(num))):
            num1 = max(int(num)[i : j + 1])
            for q in range(i, len(str(num))):
                if num(int(str(num)[i : j + 1])):
                    print(num)
